package cn.com.headfree.base.dao.impl;

import cn.com.headfree.base.dao.TIgwUserDao;
import cn.com.headfree.entity.isc.TIgwUser;
import cn.com.headfree.entity.isc.User;
import com.gta.edu.sdk.base.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;


@Repository("tIgwUserDao")
public class TIgwUserDaoImpl extends BaseDaoImpl<TIgwUser> implements TIgwUserDao {


    @Override
    public User getLoginUserInfoByUserId(String userId) {
        String sql = "select t.user_id as private_identity_id,t.erp_no as fax,t.user_name as name,t.user_role as remark from t_ding_user t where 1=1 and t.user_id= ? ";
        return this.findUnique(User.class, sql, new Object[] { userId });
    }

    @Override
    public User getLoginUserInfoByAccount(String account) {
        String sql = "select t.user_id as private_identity_id,t.erp_no as fax,t.user_name as name,t.user_role as remark from t_igw_user t where 1=1 and t.account= ? ";
        return this.findUnique(User.class, sql, new Object[] { account });
    }
}
